import request from '@/utils/request'

// 查询交易记录列表
export function listRecord(query) {
  return request({
    url: '/business/record/list',
    method: 'get',
    params: query
  })
}

// 查询交易记录详细
export function getRecord(id) {
  return request({
    url: '/business/record/' + id,
    method: 'get'
  })
}

// 新增交易记录
export function addRecord(data) {
  return request({
    url: '/business/record',
    method: 'post',
    data: data
  })
}

// 修改交易记录
export function updateRecord(data) {
  return request({
    url: '/business/record',
    method: 'put',
    data: data
  })
}

// 撤单
export function cancleOrder(data) {
  return request({
    url: '/business/record/cancle',
    method: 'post',
    data: data
  })
}



// 删除交易记录
export function delRecord(id) {
  return request({
    url: '/business/record/' + id,
    method: 'delete'
  })
}

// 盈利率和赢次率统计
export function winRateStatistics(type) {
  return request({
    url: '/business/record/winRateStatistics/' + type,
    method: 'get'
  })
}


